package com.zdp.user.controller;

import com.zdp.api.controller.user.HelloControllerApi;
import com.zdp.user.mapper.AppUserMapper;
import com.zdp.grace.result.IMOOCJSONResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author sesshomaru
 * @date 2021/5/19 21:37
 */
@RestController
public class HelloController implements HelloControllerApi {

    final static Logger logger = LoggerFactory.getLogger(HelloController.class);

    @Autowired
    private AppUserMapper appUserMapper;

    @Override
    public Object hello() {
        logger.debug("debug: hello~");
        logger.info("info: hello~");
        logger.error("error: hello~");
        logger.warn("warn: hello~");

        return IMOOCJSONResult.ok(appUserMapper.selectAll());
    }
}
